home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
bipl.zip
/
PROGS.ZIP
/
QT.ICN
< prev
next >
Wrap
Text File
|
1992-11-26
|
871b
|
40 lines
############################################################################
#
# File: qt.icn
#
# Subject: Program to announce time in English
#
# Author: Robert J. Alexander
#
# Date: May 20, 1992
#
###########################################################################
#
# Usage: qt [-a]
#
# If -a is present, only the time is printed (for use in scripts), e.g.:
#
# just after a quarter to three
#
# otherwise, the time is printed as a sentence:
#
# It's just after a quarter to three.
#
############################################################################
link saytime
procedure main(arg)
local pre,suf
if arg[1] == "-a" then {
pop(arg)
pre := suf := ""
}
else {
pre := "It's "
suf := "."
}
arg[1] | put(arg)
every write(pre,saytime(!arg),suf)
end